Skip to content

Drivers: max17055: retrieve the current value #93034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samueltardieu
Copy link
Contributor

@samueltardieu samueltardieu commented Jul 11, 2025

The MAX17055 peripheral allows measuring the current value (which corresponds to the instantaneous value). Respond to the SENSOR_CHAN_CURRENT command, and retrieve the data from the 0x0a device register.

ubieda
ubieda previously approved these changes Jul 11, 2025
Copy link
Member

@ubieda ubieda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but please fix CI

@samueltardieu
Copy link
Contributor Author

Looks good, but please fix CI

I switched it to a private MAX17055 extension, as was done already for the open-circuit voltage. This should also fix the CI.

@ubieda
Copy link
Member

ubieda commented Jul 14, 2025

@samueltardieu it seems there's still some CI issues.

@samueltardieu
Copy link
Contributor Author

samueltardieu commented Jul 14, 2025

@samueltardieu it seems there's still some CI issues.

Yes (a "decasting" of the enum to an integer type or similar was missing to avoid a warning), and that was a good thing: in the meantime, I noticed I could use SENSOR_CHAN_CURRENT instead of defining a new enum value, as is done in the npm13xx_charger and some others sensors already.

Updating the PR!

@samueltardieu
Copy link
Contributor Author

I am puzzled with the CI failure which seems unrelated to this PR:

INFO    - 1019/1019 qemu_x86_64/atom          sample.kernel.bootargs.efi                         FAILED unexpected eof (qemu 6.919s <zephyr>)

@ubieda
Copy link
Member

ubieda commented Jul 14, 2025

Would you mind rebasing to latest upstream/main?

@samueltardieu
Copy link
Contributor Author

Would you mind rebasing to latest upstream/main?

Done.

The MAX17055 peripheral allows measuring the current
value (which corresponds to the instantaneous value). Respond to
the `SENSOR_CHAN_CURRENT` command, and retrieve the data
from the `0x0a` device register.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
@samueltardieu
Copy link
Contributor Author

(and updated the description)

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sensors Sensors platform: ADI Analog Devices, Inc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants